package bean.ex03;

import javax.faces.bean.ApplicationScoped;

import javax.faces.bean.ManagedBean;


@ManagedBean(name="valida")
@ApplicationScoped
public class ParOuImpar {

	private int valor;

	public ParOuImpar() {
		super();
	}
	
	public int getValor() {
		return valor;
	}

	public void setValor(int valor) {
		this.valor = valor;
	}
	
	public String avalia() {
		if (valor % 2 == 0) {
			return "par";
		}
		return "impar";
	}
}
